package com.jqq.homework;

import java.security.KeyStore;
import java.util.*;

/**
 * @author 姬倩倩
 * @version 1.0
 */
@SuppressWarnings({"all"})
public class Homework03 {
    public static void main(String[] args) {
        Map map = new HashMap();
        map.put("jack", 650);
        map.put("tom", 1200);
        map.put("smith", 2900);

        map.put("jack",2600);
        //entrySet
        Iterator iterator = map.entrySet().iterator();
        while (iterator.hasNext()) {
            Map.Entry entry =  (Map.Entry)iterator.next();
            entry.setValue((Integer)entry.getValue()+100);
            System.out.println(entry.getKey());
            System.out.println(entry.getValue());
        }
        //keySet
        Set keySet = map.keySet();
        for (Object key :keySet) {
            map.put(key, (Integer)map.get(key)+1000);
        }
        System.out.println(map);
        //values
        Collection values = map.values();
        for (Object o :values) {
            System.out.println("工资="+o);
        }

    }
}
